<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-for循环对象数组</title>
    <script src="/js/vue.js"></script>
</head>
<body>
<div id="app">
    <p v-for="stu in students">
        <span v-for="(v,k) in stu">{{k}}的值是{{v}}&nbsp;&nbsp;&nbsp;</span>
    </p>

</div>

<script>
    new Vue({
        el: "#app",
        data: {
            students:[
                {
                    name:"王贺",
                    age:24
                },
                {
                    name:"孟云鹏",
                    age:24
                },
                {
                    name:"曹操",
                    age:2100
                },
            ]
        }
    });
</script>
</body>
</html>